package singleton;

import java.io.FileReader;
import java.io.IOException;
import java.util.Properties;

/**
 * Title: EH-TP <br>
 * Description: <br>
 * Date: 2016年06月27日 <br>
 * Copyright (c) 2015 EH <br>
 *
 * @author zhuqiang
 */
public class Appconfig {
    private Properties properties = new Properties();

    private static Appconfig appconfig = new Appconfig();
    private Appconfig() {
        try {
            properties.load(new FileReader("xxx"));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    public static Appconfig getInstance(){
        return appconfig;
    }
    public String getValue(String key){
        return (String) properties.get(key);
    }
}

class Client{
    public static void main(String[] args) {
        Appconfig.getInstance().getValue("sss");
    }
}


